﻿using System;
using SimpleServiceBus.Endpoint;
using SimpleServiceBus.Messages.Management.Monitoring;

namespace SimpleServiceBus.Server.Management.EndpointMonitor
{
    public class EndpointStatusEventArgs : EndpointEventArgs
    {
        public EndpointStatusEventArgs()
        {
        }

        public EndpointStatusEventArgs(EndpointMonitorServer.ActiveEndpoint expiredEndpoint)
            : base(expiredEndpoint.EndpointID)
        {
            LastStatusReceived = expiredEndpoint.LastStatusReceived;
            LastStatusMessage = expiredEndpoint.LastStatus;
        }

        public DateTime LastStatusReceived { get; set; }
        public EndpointStatusMessage LastStatusMessage { get; set; }
    }
}